import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsOptional, IsString } from 'class-validator';
export class CreatePermissionDto {
  @ApiProperty({
    description: '权限名称',
  })
  @IsNotEmpty({
    message: '权限名称不能为空',
  })
  name: string;

  @ApiProperty({
    description: '权限描述',
  })
  @IsOptional()
  @IsString({
    message: '权限描述必须为字符串',
  })
  desc: string;
}
